home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / tex / uniq.zip / UNIQ.MAN < prev   
Text File  |  1994-05-23  |  2KB  |  80 lines

  1. UNIQ(1)                  USER COMMANDS                    UNIQ(1)
  2.  
  3. NAME
  4.   uniq - remove or report adjacent duplicate lines
  5.  
  6. AUTHOR
  7.   Jason Mathews
  8.   NASA/Goddard Space Flight Center
  9.   Code 633.2
  10.   Greenbelt, Maryland  20771
  11.   <mathews@nssdca.gsfc.nasa.gov>
  12.  
  13. COPYRIGHT
  14.   Copyright (C) 1992-94 by Jason Mathews.  Permission is granted to any
  15.   individual or institution to use, copy or modify this software so
  16.   long as it is not sold for profit, provided this copyright notice
  17.   is retained.
  18.  
  19. SYNOPSIS
  20.   uniq  [-c | -d | -u] [ +|-n ] [ inputfile [ outputfile ] ]
  21.  
  22. DESCRIPTION
  23.   The uniq command reads standard input by default, or input_file, compares
  24.   adjacent lines, removes the second and succeeding occurrences of a line,
  25.   and writes to standard output or the specified file output_file.
  26.   Repeated lines must be on consecutive lines to be found.  You can arrange
  27.   them with the sort command before processing.
  28.  
  29. OPTIONS
  30.   -c   Supersede -u and -d and generate an output report in
  31.        default style but with each line preceded by a count of
  32.        the number of times it occurred.
  33.  
  34.   The normal output of uniq is the union of the  -u  and  -d
  35.   options.
  36.  
  37.   -d   Write one copy of just the repeated lines.
  38.  
  39.   -u   Copy only those lines which are not repeated in the
  40.        original file.
  41.  
  42.   The n arguments specify skipping an initial portion of each
  43.   line in the comparison:
  44.  
  45.   -n      The first n fields together with any blanks before
  46.           each are ignored.  A field is defined as a string of
  47.           non-SPACE, non-TAB characters separated by SPACE and
  48.           TAB characters from its neighbors.
  49.  
  50.   +n      The first n characters are ignored.  Fields are
  51.           skipped before characters.
  52.  
  53. EXAMPLES
  54.  
  55.   To delete repeated lines in the following file called fruit and save it to
  56.   a file named newfruit, enter:
  57.  
  58.        uniq fruit newfruit
  59.  
  60.   The file fruit contains the following lines:
  61.  
  62.        apples
  63.        apples
  64.        bananas
  65.        cherries
  66.        cherries
  67.        peaches
  68.        pears
  69.  
  70.   The file newfruit contains the following lines:
  71.  
  72.        apples
  73.        bananas
  74.        cherries
  75.        peaches
  76.        pears
  77.  
  78.  
  79. MS-DOS Release 1.1   Last change: 23 May 1994
  80.